<?
include_once('File.php');

class UploadedFile extends File {
	private $originalFilename;

	function __construct($filename,$originalFilename,$canonicalize=false) {
		parent::__construct($filename,$canonicalize);
		// throw exception if file isnt an uploaded file
		if (!is_uploaded_file($this->getLocation()))
			throw new InvalidArgumentException('Given file is not an uploaded file: '.$this->getFile());
		$this->originalFilename= $originalFilename;
	}
	function getOriginalName() {
		return $this->originalFilename;
	}
}